<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('teacher')} > ${i18n.getMessage('offering')}">
	<a href="#" onclick="cc('teacher/showInfoTeacher.sgt?id=${teacher.id}')">${i18n.getMessage('teacher')}</a>
</@showTitle>

<br/>

<@display.table id="listTable" name="offerings">
	<@display.column title="${i18n.getMessage('no')}" class="center w030">${listTable_rowNum!}</@display.column>
	<@display.column title="${i18n.getMessage('name')}" class="w100"><a href="javascript:cc('offering/showInfoOffering.sgt?id=${(listTable.id)!}')">${(listTable.name)!}</a></@display.column>
	<@display.column title="${i18n.getMessage('room')}" class="w080" property="room.code" href="materialFacilities/showInfoRoom.sgt?id=${(listTable.room.id)!}" sortable="true"></@display.column>
	<@display.column title="${i18n.getMessage('shift')}" class="center w100" sortable="true">${(listTable.shift.startTime?time)!}-${(listTable.shift.endTime?time)!}</@display.column>
	<@display.column title="${i18n.getMessage('startDate')}" class="center w100" property="startDate" format="{0, date, ${i18n.getMessage('format.date')}}" sortable="true"></@display.column>
	<@display.column title="${i18n.getMessage('endDate')}" class="center w100" property="endDate" format="{0, date, ${i18n.getMessage('format.date')}}" sortable="true"></@display.column>
	
	<@display.column title="${i18n.getMessage('teachingSubstitute')}">
		<#if listTable.teachingInterruptions??>
			<#list listTable.teachingInterruptions as sub>
				<#if sub.substituteTeacher?? && (sub.substituteTeacher.id == teacher.id)>
					${(sub.fromDate)!} [${(sub.teacher.firstName)!}], 
				</#if>
			</#list>
		</#if>
	</@display.column>
	
	${(listTable.teachingSwitchs.size())!}
	<@display.column title="${i18n.getMessage('teachingTransfer')}">
		<#if listTable.teachingSwitchs??>
			<#list listTable.teachingSwitchs as swi>
				<#if swi.inplaceTeacher?? && (swi.inplaceTeacher.id == teacher.id)>
					${(swi.fromDate)!} [${(swi.mainTeacher.firstName)!}], 
				</#if>
			</#list>
		</#if>
	</@display.column>
</@display.table>

<br/>